Skip to content

fix(replay): Do not report dead clicks after a bfcache restore - #26704

Merged
andreiborza merged 2 commits into
developfrom
ab/fix-replay-bfcache-dead-clicks
Nov 20, 2026
Merged

andreiborza merged 2 commits into
developfrom
ab/fix-replay-bfcache-dead-clicks

Conversation

@andreiborza

@andreiborza andreiborza commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

What

Replay no longer reports a dead click for a link click that left the page, when the user goes back and the browser restores the page from the bfcache.

Why

The pending click check resumed after the restore and reported a slow click with a timeout, so multi-page apps got false dead clicks.

Reproduction

  1. Open before (npm 11.14.0) or after (this PR) in Chrome.
  2. Click "Go to page B", then use the browser back button.
  3. Wait 10 seconds, then click "Refresh status".

The status line must show restored from bfcache: true. Before: "Dead clicks" shows body > p > a#go (timeout, 7000ms). After: it shows none. Source: andreiborza/sentry-replay-bfcache-repro.

Closes: #12666

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 8022a0c (PR test merge using develop at bd2d389)

Against: 1013ef9 (develop) · base run #67306

⚠️ Baseline mismatch: 5 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for bd2d389 finishes.

Path Size % Change Change
@sentry/browser 30.23 kB - -
@sentry/browser - with treeshaking flags 28.43 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.33 kB - -
@sentry/browser (incl. Tracing) 52.81 kB - -
@sentry/browser (incl. Tracing Core) 40.33 kB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 52.81 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.69 kB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay) 92.88 kB +0.03% +26 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.7 kB +0.04% +28 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.22 kB -0.02% -15 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 110.8 kB +0.03% +26 B 🔺
@sentry/browser (incl. Feedback) 48.17 kB - -
@sentry/browser (incl. sendFeedback) 30.81 kB - -
@sentry/browser (incl. FeedbackAsync) 35.84 kB - -
@sentry/browser (incl. Metrics) 31.55 kB - -
@sentry/browser (incl. Logs) 31.83 kB - -
@sentry/browser (incl. Metrics & Logs) 32.49 kB +0.01% +1 B 🔺
@sentry/react 32.24 kB - -
@sentry/react (incl. Tracing) 55.45 kB - -
@sentry/vue 38.45 kB - -
@sentry/vue (incl. Tracing) 55.75 kB - -
@sentry/svelte 30.24 kB - -
@sentry/remix (Remix 3 client bundle) 58.46 kB -0.01% -1 B 🔽
CDN Bundle 32.16 kB - -
CDN Bundle (incl. Tracing) 53.19 kB - -
CDN Bundle (incl. Logs, Metrics) 34.95 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.76 kB -0.01% -1 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 76.02 kB +0.05% +37 B 🔺
CDN Bundle (incl. Tracing, Replay) 91.1 kB +0.03% +27 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.71 kB +0.03% +25 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.51 kB +0.04% +29 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.07 kB +0.04% +31 B 🔺
CDN Bundle - uncompressed 93.91 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.26 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.24 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 164.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.48 kB +0.06% +118 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.53 kB +0.05% +119 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.16 kB +0.05% +119 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.46 kB +0.05% +119 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.08 kB +0.05% +119 B 🔺
@sentry/nextjs (client) 59.15 kB +0.01% +1 B 🔺
@sentry/sveltekit (client) 54.06 kB - -
@sentry/core/server 45.28 kB - -
@sentry/core/browser 14.41 kB - -
@sentry/node 154.01 kB -0.01% -6 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.33 kB - -
@sentry/node - without tracing 88.81 kB - -
@sentry/node - without channel injection 142.98 kB -0.01% -6 B 🔽
@sentry/aws-serverless 99.41 kB -0.01% -4 B 🔽
@sentry/cloudflare (withSentry) - minified 208.5 kB - -
@sentry/cloudflare (withSentry) 483.88 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 1.02 MB - -
@sentry/nextjs/cloudflare (withSentry) - minified 233.74 kB - -

View base workflow run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 24e3489. Configure here.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 25 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Failing after 1m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 29s Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 46s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 47s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 49s Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 47s Details

@andreiborza
andreiborza marked this pull request as ready for review November 20, 2026 15:18

@msonnb msonnb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@andreiborza
andreiborza merged commit 36977c3 into develop Nov 20, 2026
306 of 307 checks passed
@andreiborza
andreiborza deleted the ab/fix-replay-bfcache-dead-clicks branch November 20, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dead clicks are created when users navigate back in a MPA

2 participants